home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Canadian & World Encyclopedia 1998
/
The Canadian & World Encyclopedia 1998 - Disc 2.iso
/
mac
/
prime_CD
/
pb
/
PREVIEW.DIR
/
00148_Script_slide control parent
< prev
next >
Wrap
Text File
|
1997-07-22
|
2KB
|
70 lines
property slideRange, currentSlide, displayChan, slideTotal, cursorHolder
------ these are the only ones you need to call
on next me
waitTheCursor me
bumpSlide me, 1, 2, 16, TRUE
deWaitTheCursor me
end
on prev me
waitTheCursor me
bumpSlide me, -1, 2, 16, TRUE
deWaitTheCursor me
end
----------------------------------------------
on new me, slideMemberRange, imageChannel -- e.g. [40,69], gSSimageChan
init me, slideMemberRange, imageChannel
-- put "slide changer initialized"
put "1 of" && slideTotal into field "legend"
return me
end
on init me, slideMemberRange, imageChannel
set slideRange = slideMemberRange
set currentSlide = getAt(slideRange,1)
set displayChan = imageChannel
set slideTotal = getAt(slideRange,2) - getAt(slideRange,1) + 1
puppetsprite displayChan, TRUE
set the trails of sprite displayChan = TRUE
return me
end
--puppetTransition whichTransition, 6, 64, TRUE
on bumpSlide me, howMuch, trQuartSecs, trChunkSize, trChangedOnly
if howMuch > 0 then set whichTransition = 2
else set whichTransition = 1
set currentSlide = currentSlide + howMuch
-- wrap if hi
if currentSlide > getAt(slideRange,2) then set currentSlide = getAt(slideRange,1)
-- wrap if lo
if currentSlide < getAt(slideRange,1) then set currentSlide = getAt(slideRange,2)
puppetsprite displayChan, 1
set the memberNum of sprite displayChan to the number of member currentSlide
puppetTransition whichTransition, trQuartSecs, trChunkSize, trChangedOnly
-- put integer(word 1 of field "legend") into theSlideNum
-- updatestage
set theSlideNum = (currentSlide - getAt(slideRange,1)) + 1 -- + howMuch
put theSlideNum into word 1 of field "legend"
end
on waitTheCursor me
set cursorHolder = the cursor of sprite the clickon
set the cursor of sprite the clickon to 4
cursor 4
return me
end
on deWaitTheCursor me
set the cursor of sprite the clickon to cursorHolder
cursor -1
return me
end